<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>角色授权</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../lib/layui/css/layui.css">
    <link rel="stylesheet" href="../../css/oksub.css">
</head>
<body>
    <div class="ok-body">
        <!--form表单-->
        <form class="layui-form layui-form-pane ok-form">
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="auth">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
    <!--js逻辑-->
    <script src="../../lib/layui/layui.js"></script>
    <script>
        layui.config({
            base: 'lib/layui/lay/modules/authtree/'
        }).extend({
            authtree: 'authtree',
        });

        layui.use(['element', 'jquery', 'form'], function () {
            var element = layui.element;
            var $ = layui.jquery;
            var form = layui.form;

            form.on('submit(auth)', function (data) {
                console.log(data.field);
                layer.msg("授权成功！", {icon: 6, time: 1000, anim: 4}, function () {
                    parent.layer.close(parent.layer.getFrameIndex(window.name));
                });
                return false;
            });
        })
    </script>
</body>
</html>
